import request from '@/utils/request'

// 查询车场管理列表
export function listParking(query) {
  return request({
    url: '/property/parking/list',
    method: 'get',
    params: query
  })
}

// 查询车场管理详细
export function getParking(parkingId) {
  return request({
    url: '/property/parking/' + parkingId,
    method: 'get'
  })
}

// 新增车场管理
export function addParking(data) {
  return request({
    url: '/property/parking',
    method: 'post',
    data: data
  })
}

// 修改车场管理
export function updateParking(data) {
  return request({
    url: '/property/parking',
    method: 'put',
    data: data
  })
}

// 删除车场管理
export function delParking(parkingId) {
  return request({
    url: '/property/parking/' + parkingId,
    method: 'delete'
  })
}

// 导出车场管理
export function exportParking(query) {
  return request({
    url: '/property/parking/export',
    method: 'get',
    params: query
  })
}


// 一键生成单元/楼层数据
export function generationCarport(data) {
  return request({
    url: '/property/parking/generationCarport',
    method: 'post',
    data: data
  })
}

// 查询车场车位详情
export function getParkingCarport(parkingId) {
  return request({
    url: '/property/parking/getParkingCarport/' + parkingId,
    method: 'get'
  })
}

